#!/bin/bash
VERSION=nodevice
NAME=yfhub/tearoom
REGISTRY=docker.hgpark.cn
IMAGE_NAME=${REGISTRY}/${NAME}:${VERSION}
CONTAINER_NAME=${NAME}

docker rm -vf ${CONTAINER_NAME}
docker rmi ${IMAGE_NAME}

docker build -t ${IMAGE_NAME} .

docker login ${REGISTRY}
docker push ${IMAGE_NAME}